import request from './request'; // 假设你有一个封装的 request 函数来处理 HTTP 请求
export function getSearchResult(data) {
  return request({
    url: '/att/search',
    method: 'post',
    data: data,
  })
}
export function findAttWorkingData(id, date) {
  return request({
    url: `/att/findWorkingTime?employeeId=${id}&date=${date}`,
    method: 'get',
  });
}

export function findAttOverData(id, date) {
  return request({
    url: `/att/findOverTime?employeeId=${id}&date=${date}`,
    method: 'get',
  });
}

export function findAttData(id, date) {
  return request({
    url: `/att/find?employeeId=${id}&date=${date}`,
    method: 'get',
  });
}

export function addAttendance(data) {
  return request({
    url: '/att/add',
    method: 'POST',
    data: data
  });
}

export function updateEmployee(data) {
  return request({
    url: '/employee/update',
    method: 'post',
    data: data,
  });
}
export function fetchSubEmployeesProjects(data) {
  return request({
    url: `/subemp/getP?empId=${data}`,
    method: 'get',
  });
}

